/*!
 * \file LoadSave.h
 *
 * \date Jan 13, 2009
 * \author Sarah Smith sez@storybridge.org
 */

#ifndef LOADSAVE_H_
#define LOADSAVE_H_

#include <QDialog>
#include <QModelIndex>
#include <DndData/DndData.h>
#include <Xml/XmlPath.h>

class QDirModel;

namespace Ui {
    class LoadSaveDialog;
}

class LoadSave: public QDialog
{
    Q_OBJECT
public:
    static const char *BASE_ICON_NAMES[];
    static const char *SUB_ICON_NAMES[];

    LoadSave(QWidget *parent = 0);
    virtual ~LoadSave();
    QString title() const;
    XmlPath path() const { return mXmlPath; }
    void setXmlPath(const XmlPath& path);
Q_SIGNALS:
    void statusMessage(const QString &message);
    void pathUpdated();
protected Q_SLOTS:
    void on_buttonBox_accepted();
private Q_SLOTS:
    void on_titleLineEdit_textEdited(const QString &);
    void on_treeView_doubleClicked(const QModelIndex &);
    void on_preferencesPushButton_clicked(bool);
    void focusRootDirectory();
private:
    void setWindowTitles();

    Ui::LoadSaveDialog *mLoadSave;
    XmlPath mXmlPath;
    QDirModel *mDirModel;
    bool mPathChanged;
};

#endif /* LOADSAVE_H_ */
